package com.jw.service;

import com.jw.entity.User;
import org.springframework.stereotype.Service;

@Service
public class UserService {
 
    public User getUser(String userId, String password){
        if ("admin".equals(userId) && "admin".equals(password)){
            User user=new User();
            user.setUserID("admin");
            user.setUserName("admin");
            user.setPassWord("admin");
            return user;
        }
        else{
            return null;
        }
    }
 
    public User getUser(String userId){
        if ("admin".equals(userId)){
            User user=new User();
            user.setUserID("admin");
            user.setUserName("admin");
            user.setPassWord("admin");
            return user;
        }
        else{
            return null;
        }
    }
}
